package watercalc.comparators;

import java.util.Comparator;
import watercalc.Vertex;

//Class used to sort an stl container of Vertex* with stable vertexes first
public class HeightAndCapacityComparator implements Comparator<Vertex> {
@Override
	public int compare(Vertex v1, Vertex v2) {
		return (v1.height + v1.capacity >= v2.height + v2.capacity) ? 1 : -1;
	}
}